package com.untour.im.exception;

import com.untour.im.common.enums.CodeEnum;
import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException {
	private String code;

	public BusinessException(CodeEnum codeEnum){
		super(codeEnum.getMessage());
		this.code = codeEnum.getCode();
	}

	public BusinessException(CodeEnum codeEnum,String message){
		super(message);
		this.code = codeEnum.getCode();
	}

	public BusinessException(CodeEnum codeEnum,Throwable cause){
		super(codeEnum.getMessage(),cause);
		this.code = codeEnum.getCode();
	}

}
